package cn.iocoder.ny.module.mall.service.impl;

import cn.iocoder.ny.module.mall.domain.MallBanner;
import cn.iocoder.ny.module.mall.domain.MallBannerPageVo;
import cn.iocoder.ny.module.mall.mapper.MallBannerMapper;
import cn.iocoder.ny.module.mall.service.IMallBannerService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author luchunhong
 * @date 2024/07/23/ 11:57
 * @description:
 */
@Service
public class MallBannerServiceImpl extends ServiceImpl<MallBannerMapper,MallBanner> implements IMallBannerService {

    @Autowired
    private MallBannerMapper mallBannerMapper;


    @Override
    public PageResult<MallBanner> getBannerPage(MallBannerPageVo mallBannerPageVo) {
        return mallBannerMapper.selectPage(mallBannerPageVo);

    }

    @Override
    public MallBanner queryById(Long id) {
        MallBanner slectOne = lambdaQuery().eq(MallBanner::getId, id).one();
        return slectOne;
    }


}
